<?php

namespace App\Controller;

use App\Model\User;
use Common\Controller;
use Common\Factory;

class Index extends Controller
{

    public function index()
    {
        $user = Factory::getModel("user");
        $userid = array('name' => 'rango', 'mobile' => '189xxxx');
        $user->create($userid);
        return array('userid' => $userid, 'name' => 'rango');
    }

    public function index2()
    {
        $db = Factory::getDatabase();
        $db->query("SELECT * name FROM `user` where id = 1 limit 1");
        $db->query("UPDATE FROM `name`='刘⑦' where id = 1 limit 1");
       
    }
}
